home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
009
/
exepatc1.arc
/
EXEPATCH.DOC
< prev
Wrap
Text File
|
1985-06-13
|
3KB
|
58 lines
EXEPATCH Utility Program -- Written 6/84, Revised 4/85
(c) Copyright 1985 by Mark Horvatich -- ALL RIGHTS RESERVED
This program allows the user to alter the memory allocation values
of a specified .EXE file. When LINK creates an .EXE file, it uses
the object modules passed to determine the absolute minimum amount
of memory the system must allocate above the actual program for it
to operate properly. If there is insufficient memory, the load
will fail. There is seldom a need to alter this value, with the
only exception being an assembly language program which must rely
on a specific data segment size before execution can begin.
In addition to setting the minimum amount of memory to be allocated,
LINK also sets a maximum. When the program is loaded for execution,
the system will allocate additional memory, over the minimum that
is required, up to the maximum specified. If the maximum amount
cannot be allocated, there is no failure; the system allocates as
much as it can.
Under default conditions, LINK will set the maximum to FFFF hex.
This tells the system to allocate as much as 65535 16-byte paragraphs
of memory; in other words, all of the rest of memory. This causes
two problems for programmers:
1) The memory allocated will overwrite the memory-resident part
of COMMAND.COM. Every time the program terminates, the
system will have to reload COMMAND.COM from disc.
2) If the program tries to use the allocate-memory or execute-
process functions, they will fail due to a lack of available
memory.
EXEPATCH was developed primarily as a solution to these two problems.
For most languages, the EXE file should be patched to specify 1000 hex
paragraphs for the maximum amount of memory to allocate. This assures
a 64K data segment area, which is the most common case. For programs
written in assembly language or Pascal which may require larger data
data segments, this value can be adjusted upward.
This program accepts standard command line format, making it ideal for
use through a batch file. The most typical application noted so far
is to create a batch file which executes the LINK program, followed
immediately by the EXEPATCH program. An example for BASIC follows:
LINK %1,%1,CON,BASCOM
EXEPATCH %1;
The semicolon following the file name will cause EXEPATCH to use the
default responses for the minimum and maximum allocation values. This
will leave the minimum alone, and change the maximum to 1000 hex.
So, you compiled BASIC users out there - enjoy!
Mark Horvatich
Colo. Springs, CO